<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>变量案例02</title>
    <script>
        var name = prompt('请输入你的用户名');
        alert('欢迎用户' + name + '的到来');
    </script>

</head>

<body>


</body>

</html>